<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link type="text/css" rel="stylesheet" href="../css/layui.css" />
		<script type="text/javascript" src="../layui.js"></script>
	</head>
	<body>
		<form id="addUser" class="layui-form" action="">
			<div class="layui-form-item">
				<label class="layui-form-label"><span style="color: red;">*</span>用户名</label>
				<div class="layui-input-inline" style="width:350px;">
					<input type="text" id="LoginName" placeholder="请输入用户名" name="loginName"
					lay-verify="required" class="layui-input" />
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label"><span style="color: red;">*</span>密码</label>
				<div class="layui-input-inline" style="width:350px;">
					<input type="text" id="password" placeholder="请输入密码"
					  lay-verify="required" class="layui-input" />
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="login">提交</button>
					<button type="reset" class="layui-btn" lay-submit>取消</button>
				</div>
			</div>
		</form>
		<script>
			layui.use(['layer','form'],function(){
				var $=layui.$,
				layer=layui.layer,
				form=layui.form;
				form.on('submit(login)',function(data){//监听
				    var url = "http://stuapi.ysdjypt.com/api/login";
					var str = { LoginName: "孙磊", password: "ysd123",token:"23d66d84-fae1-45d5-bd07-b694662fe579"};
										$.post(url,str,function(data){
											if(data.success=="true"){
												
											};
										},"json");
				});
			});
		</script>
		
	</body>
</html>
